package com.chenjun.web.controller.oa;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.chenjun.common.base.ResultDto;
import com.chenjun.common.bean.Pagination;
import com.chenjun.common.model.DataGridModel;
import com.chenjun.core.service.oa.OaBillAttnMonthReportService;
import com.chenjun.core.service.oa.OaBillTravelRegisterService;

/**
 * @Description:  出勤统计
 * @author dongyibin
 * @date 2017-9-24 上午11:56:10
 */
@Controller
@SuppressWarnings("serial")
@RequestMapping("travelStatistics")
public class TravelStatisticsController {
	@Autowired
	private OaBillAttnMonthReportService monthReportService;
	@Autowired
	private OaBillTravelRegisterService travelRegisterService;

	@RequestMapping("/list.html")
	public String index() {
		return "attendanceSelect/travelStatistics";
	}
	
	/**
	 * @Description: 出勤数据统计  
	 * @param param
	 * @return
	 * @author dongyibin
	 * @date 2017-9-24 下午12:44:33
	 */
	@RequestMapping("/search")
	@ResponseBody
	public ResultDto getTravelStatistics(DataGridModel param) {
		ResultDto rtDto = new ResultDto();
		Pagination pagination = monthReportService.getAttnDetailStatistics(param);
		rtDto.setData(pagination);
		return rtDto;
	}
		
}
